// CoalMineInfoSet.cpp : implementation file
//

#include "stdafx.h"
#include "KWServerCore.h"
#include "CoalMineInfoSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCoalMineInfoSet

//IMPLEMENT_DYNAMIC(CCoalMineInfoSet, CThreadSafeRecordset)

CCoalMineInfoSet::CCoalMineInfoSet/*(CDatabase* pdb)*: CThreadSafeRecordset(pdb)*/
(CAdoConnection *pConnection)	: CAdoRecordSet(pConnection)
{
	m_pConnection = pConnection;

	//{{AFX_FIELD_INIT(CCoalMineInfoSet)
	m_ConnectionStatus = 0;
	m_Id = 0;
	m_IPAddr = _T("");
	m_Name = _T("");
	//m_nFields = 4;
	//}}AFX_FIELD_INIT
	//m_nDefaultType = snapshot;
}


CString CCoalMineInfoSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=KWSystem;UID=kwuser;PWD=1234");
}

CString CCoalMineInfoSet::GetDefaultSQL()
{
	return _T("[dbo].[CoalMineInfo]");
}

void CCoalMineInfoSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CCoalMineInfoSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Byte(pFX, _T("[ConnectionStatus]"), m_ConnectionStatus);
	RFX_Long(pFX, _T("[Id]"), m_Id);
	RFX_Text(pFX, _T("[IPAddr]"), m_IPAddr);
	RFX_Text(pFX, _T("[Name]"), m_Name);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CCoalMineInfoSet diagnostics

#ifdef _DEBUG
void CCoalMineInfoSet::AssertValid() const
{
	//CThreadSafeRecordset::AssertValid();
}

void CCoalMineInfoSet::Dump(CDumpContext& dc) const
{
	//CThreadSafeRecordset::Dump(dc);
}
#endif //_DEBUG
